package com.bawei.hgshop.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import com.bawei.hgshop.entity.Spu;
import com.bawei.hgshop.entity.SpuVo;

public interface SpuMapper {

	List<Spu> list(SpuVo spuVo);
	
	Spu findById(int id); 

	@Insert("insert into hg_spu(goods_name,is_marketable,brand_id,caption,category_id,small_pic)"
			+ "values(#{goodsName},#{isMarketable},#{brand.id},#{caption},#{category.id},#{smallPic})")
	int add(Spu spu);

	int upddate(Spu spu);

	int delBatch(int[] ids);

}
